#include "MessageEvent.h"


namespace Impp
{

DEFINE_EVENT_TYPE(EVT_MESSAGE_IN)
DEFINE_EVENT_TYPE(EVT_MESSAGE_OUT)

MessageEvent::MessageEvent(Buddy* & sender, const wxDateTime  & time, const wxString msg, db_id & historyId, int/*<MessageEventType>*/ messageEventType, wxEventType eventType, int id) :
	wxNotifyEvent(eventType,id),
	buddy(sender),
	time(time),
	msg(msg),
	historyId(historyId),
	messageEventType(messageEventType)
{
}

MessageEvent::~MessageEvent()
{
}

Buddy* MessageEvent::getBuddy(){
	return buddy;
}

wxDateTime MessageEvent::getTime(){
	return time;
}

wxString MessageEvent::getMessage(){
	return msg;
}

wxEvent* MessageEvent::Clone() const {
	return new MessageEvent(*this);
};

db_id MessageEvent::getHistoryId(){
	return historyId;
}

int/*<MessageEventType>*/ MessageEvent::getMessageEventType(){
	return messageEventType;
}



}
